package lad02.test19;

public class Conversion { public void reverseString(String str) {
    //创建大小写转换的方法
    char[] ch = str.toCharArray();
    for(int i = 0; i < ch.length; i++) {
        if(ch[i] >= 'A' && ch[i] <= 'Z') {
            char sl = (char)(ch[i] + 32);
            System.out.print(sl);
        }else if (ch[i] >= 'a' && ch[i] <= 'z') {
            char sl = (char)(ch[i] - 32);
            System.out.print(sl);
        }
    }
}
}
